package com.yaoxuguang.concurrence.thread_state.waiting;

/**
 * @author yaoxuguang
 * @Title: yao-interview
 * @Package com.yaoxuguang.concurrence.thread_state.waiting
 * @Description: TODO
 * @date 2018年12月26日11:38
 */
public class MyThread extends Thread {
    private Object obj;

    public MyThread(Object obj) {
        this.obj = obj;
    }

    @Override
    public void run() {
        try {
            synchronized (obj){
                obj.wait();
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
